package demon1;
class Base {
    public int a=1;
    public int b=2;
}
class Derived extends Base{
    public int a=3;
    public int c=100;
    public void test(){
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
        System.out.println(super.a);
    }
}
class Base2{
    public void testA(){
        System.out.println("testA()");
    }
}
class Derived2 extends Base2{
    public void testB(){
        System.out.println("testB()");
    }
    public void testA(){
        System.out.println("Derived2:testA()");
    }
    public void testC(){
        this.testA();
        super.testA();
        this.testB();
    }
}

public class jicheng {
    public static void main(String[] args) {
        Derived derived=new Derived();
        derived.test();
        Derived2 derived2=new Derived2();
//        derived2.testB();
//        derived2.testA();
        derived2.testC();
    }
}
